package com.tjbklx1.thread.chap02.practise06;

public class CrackerThread extends Thread {

	private final MutablePerson person;

	public CrackerThread(MutablePerson person) {
		this.person = person;
	}

	@Override
	public void run() {
		while (true) {
			ImmutablePerson immutablePerson = new ImmutablePerson(person);
			if (!immutablePerson.getName().equals(immutablePerson.getAddress())) {
				System.out.println(currentThread().getName()
						+ " ======ERROR======" + immutablePerson);
			}
		}
	}
}
